//
//  BaseViewController.m
//  Business Club
//
//  Created by 范琦 on 16/4/7.
//  Copyright © 2016年 范琦. All rights reserved.
//

#import "BaseViewController.h"
#import "UIColor+AddColor.h"

@interface BaseViewController ()

@property (nonatomic, strong) UIAlertView *alertView;

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.automaticallyAdjustsScrollViewInsets = NO;


    self.view.backgroundColor = [UIColor whiteColor];
    
}

- (void)showAlertView:(NSString *)str timeOut:(NSInteger)time
{
    self.alertView = [[UIAlertView alloc]initWithTitle:@"" message:str delegate:self cancelButtonTitle:nil otherButtonTitles: nil];
    [_alertView show];

    [NSTimer scheduledTimerWithTimeInterval:time target:self selector:@selector(time) userInfo:nil repeats:NO];
}
- (void)time
{

    [_alertView dismissWithClickedButtonIndex:0 animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
